package com.cqupt.pojo;

import java.util.ArrayList;
import java.util.List;

/**
 *用户示例
 */
public class UserExample {
    /**
     * 用户示例字段
     */

    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    /**
     * 简单构造器
     */
    public UserExample() {
        oredCriteria = new ArrayList<>();
    }

    /**
     * set方法
     * @param orderByClause
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * get字段
     * @return
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * set方法
     * @param distinct
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * 判断是否唯一
     * @return
     */
    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * 新建
     * @return
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * 清除方法
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * 抽象生成标准
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        /**
         * 添加方法，并且值不能为null
         * @param condition
         */
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        /**
         * 有参新建，并且value和property都不能为空
         * @param condition
         * @param value
         * @param property
         */
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        /**
         * 新建标准，两个值的标准
         * @param condition
         * @param value1
         * @param value2
         * @param property
         */
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        /**
         * 用户id为空
         * @return
         */
        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        /**
         * 用户id不为空
         * @return
         */
        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        /**
         * 判断用户id是否相等
         * @param value
         * @return
         */
        public Criteria andUserIdEqualTo(String value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        /**
         * 判断用户id是否不等
         * @param value
         * @return
         */
        public Criteria andUserIdNotEqualTo(String value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        /**
         * 大于指定的用户id
         * @param value
         * @return
         */
        public Criteria andUserIdGreaterThan(String value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        /**
         * 大于等于用户id
         * @param value
         * @return
         */
        public Criteria andUserIdGreaterThanOrEqualTo(String value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        /**
         * 小于用户id
         * @param value
         * @return
         */
        public Criteria andUserIdLessThan(String value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        /**
         * 小于等于指定的用户id
         * @param value
         * @return
         */
        public Criteria andUserIdLessThanOrEqualTo(String value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        /**
         * 是否相似
         * @param value
         * @return
         */
        public Criteria andUserIdLike(String value) {
            addCriterion("user_id like", value, "userId");
            return (Criteria) this;
        }

        /**
         * 是否不相似
         * @param value
         * @return
         */
        public Criteria andUserIdNotLike(String value) {
            addCriterion("user_id not like", value, "userId");
            return (Criteria) this;
        }

        /**
         * 用户id是否在用户id集合中
         * @param values
         * @return
         */
        public Criteria andUserIdIn(List<String> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        /**
         * 用户id不在集合中
         * @param values
         * @return
         */
        public Criteria andUserIdNotIn(List<String> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        /**
         * 是否介于value1 和value2之间
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andUserIdBetween(String value1, String value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        /**
         * 是否在范围之外
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andUserIdNotBetween(String value1, String value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        /***
         * 用户名为空
         * @return
         */
        public Criteria andUsernameIsNull() {
            addCriterion("username is null");
            return (Criteria) this;
        }

        /**
         * 用户名不为空
         * @return
         */
        public Criteria andUsernameIsNotNull() {
            addCriterion("username is not null");
            return (Criteria) this;
        }

        /**
         * 用户名是否相等
         * @param value
         * @return
         */
        public Criteria andUsernameEqualTo(String value) {
            addCriterion("username =", value, "username");
            return (Criteria) this;
        }

        /**
         * 用户名是否不相等
         * @param value
         * @return
         */
        public Criteria andUsernameNotEqualTo(String value) {
            addCriterion("username <>", value, "username");
            return (Criteria) this;
        }

        /**
         * 大于
         * @param value
         * @return
         */
        public Criteria andUsernameGreaterThan(String value) {
            addCriterion("username >", value, "username");
            return (Criteria) this;
        }

        /**
         * 大于等于
         * @param value
         * @return
         */
        public Criteria andUsernameGreaterThanOrEqualTo(String value) {
            addCriterion("username >=", value, "username");
            return (Criteria) this;
        }

        /**
         * 小于
         * @param value
         * @return
         */
        public Criteria andUsernameLessThan(String value) {
            addCriterion("username <", value, "username");
            return (Criteria) this;
        }

        /**
         * 小于等于
         * @param value
         * @return
         */
        public Criteria andUsernameLessThanOrEqualTo(String value) {
            addCriterion("username <=", value, "username");
            return (Criteria) this;
        }

        /**
         * 相似
         * @param value
         * @return
         */
        public Criteria andUsernameLike(String value) {
            addCriterion("username like", value, "username");
            return (Criteria) this;
        }

        /**
         * 不相似
         * @param value
         * @return
         */
        public Criteria andUsernameNotLike(String value) {
            addCriterion("username not like", value, "username");
            return (Criteria) this;
        }

        /**
         * 是否在集合中
         * @param values
         * @return
         */
        public Criteria andUsernameIn(List<String> values) {
            addCriterion("username in", values, "username");
            return (Criteria) this;
        }

        /**
         * 是否不在集合中
         * @param values
         * @return
         */
        public Criteria andUsernameNotIn(List<String> values) {
            addCriterion("username not in", values, "username");
            return (Criteria) this;
        }

        /**
         * 是否介于value1和value2之间
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andUsernameBetween(String value1, String value2) {
            addCriterion("username between", value1, value2, "username");
            return (Criteria) this;
        }

        /**
         * 是否介于value1和value2之外
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andUsernameNotBetween(String value1, String value2) {
            addCriterion("username not between", value1, value2, "username");
            return (Criteria) this;
        }

        /**
         * 密码为空
         * @return
         */
        public Criteria andPasswordIsNull() {
            addCriterion("password is null");
            return (Criteria) this;
        }

        /**
         * 密码不为空
         * @return
         */
        public Criteria andPasswordIsNotNull() {
            addCriterion("password is not null");
            return (Criteria) this;
        }

        /**
         * 密码相等
         * @param value
         * @return
         */
        public Criteria andPasswordEqualTo(String value) {
            addCriterion("password =", value, "password");
            return (Criteria) this;
        }

        /**
         * 密码不相等
         * @param value
         * @return
         */
        public Criteria andPasswordNotEqualTo(String value) {
            addCriterion("password <>", value, "password");
            return (Criteria) this;
        }

        /**
         * 大于
         * @param value
         * @return
         */
        public Criteria andPasswordGreaterThan(String value) {
            addCriterion("password >", value, "password");
            return (Criteria) this;
        }

        /**
         * 大于等于
         * @param value
         * @return
         */
        public Criteria andPasswordGreaterThanOrEqualTo(String value) {
            addCriterion("password >=", value, "password");
            return (Criteria) this;
        }

        /**
         * 小于
         * @param value
         * @return
         */
        public Criteria andPasswordLessThan(String value) {
            addCriterion("password <", value, "password");
            return (Criteria) this;
        }

        /**
         * 小于等于
         * @param value
         * @return
         */
        public Criteria andPasswordLessThanOrEqualTo(String value) {
            addCriterion("password <=", value, "password");
            return (Criteria) this;
        }

        /**
         * 相似
         * @param value
         * @return
         */
        public Criteria andPasswordLike(String value) {
            addCriterion("password like", value, "password");
            return (Criteria) this;
        }

        /**
         * 不相似
         * @param value
         * @return
         */
        public Criteria andPasswordNotLike(String value) {
            addCriterion("password not like", value, "password");
            return (Criteria) this;
        }

        /**
         * 密码在集合中
         * @param values
         * @return
         */
        public Criteria andPasswordIn(List<String> values) {
            addCriterion("password in", values, "password");
            return (Criteria) this;
        }

        /**
         * 不在集合中
         * @param values
         * @return
         */
        public Criteria andPasswordNotIn(List<String> values) {
            addCriterion("password not in", values, "password");
            return (Criteria) this;
        }

        /**
         * 密码介于之间
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andPasswordBetween(String value1, String value2) {
            addCriterion("password between", value1, value2, "password");
            return (Criteria) this;
        }

        /**
         * 在两数之外
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andPasswordNotBetween(String value1, String value2) {
            addCriterion("password not between", value1, value2, "password");
            return (Criteria) this;
        }

        /**
         * 真实名字为空
         * @return
         */
        public Criteria andRealNameIsNull() {
            addCriterion("real_name is null");
            return (Criteria) this;
        }

        /**
         * 真实名字不为空
         * @return
         */
        public Criteria andRealNameIsNotNull() {
            addCriterion("real_name is not null");
            return (Criteria) this;
        }

        /**
         * 真实名字相等
         * @param value
         * @return
         */
        public Criteria andRealNameEqualTo(String value) {
            addCriterion("real_name =", value, "realName");
            return (Criteria) this;
        }

        /**
         * 不相等
         * @param value
         * @return
         */
        public Criteria andRealNameNotEqualTo(String value) {
            addCriterion("real_name <>", value, "realName");
            return (Criteria) this;
        }

        /**
         * 大于
         * @param value
         * @return
         */
        public Criteria andRealNameGreaterThan(String value) {
            addCriterion("real_name >", value, "realName");
            return (Criteria) this;
        }

        /**
         *
         * 大于等于
         * @param value
         * @return
         */
        public Criteria andRealNameGreaterThanOrEqualTo(String value) {
            addCriterion("real_name >=", value, "realName");
            return (Criteria) this;
        }

        /**
         * 小于
         * @param value
         * @return
         */
        public Criteria andRealNameLessThan(String value) {
            addCriterion("real_name <", value, "realName");
            return (Criteria) this;
        }

        /**
         * 小于等于
         * @param value
         * @return
         */
        public Criteria andRealNameLessThanOrEqualTo(String value) {
            addCriterion("real_name <=", value, "realName");
            return (Criteria) this;
        }

        /**
         * 相似
         * @param value
         * @return
         */
        public Criteria andRealNameLike(String value) {
            addCriterion("real_name like", value, "realName");
            return (Criteria) this;
        }

        /**
         * 不相似
         * @param value
         * @return
         */
        public Criteria andRealNameNotLike(String value) {
            addCriterion("real_name not like", value, "realName");
            return (Criteria) this;
        }

        /**
         * 在集合中
         * @param values
         * @return
         */
        public Criteria andRealNameIn(List<String> values) {
            addCriterion("real_name in", values, "realName");
            return (Criteria) this;
        }

        /**
         * 不在集合中
         * @param values
         * @return
         */
        public Criteria andRealNameNotIn(List<String> values) {
            addCriterion("real_name not in", values, "realName");
            return (Criteria) this;
        }

        /**
         * 介于两数之间
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andRealNameBetween(String value1, String value2) {
            addCriterion("real_name between", value1, value2, "realName");
            return (Criteria) this;
        }

        /**
         * 介于两数之外
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andRealNameNotBetween(String value1, String value2) {
            addCriterion("real_name not between", value1, value2, "realName");
            return (Criteria) this;
        }

        /**
         * 用户组织为空
         * @return
         */
        public Criteria andUserOrganizationIsNull() {
            addCriterion("user_organization is null");
            return (Criteria) this;
        }

        /**
         * 用户组织不为空
         * @return
         */
        public Criteria andUserOrganizationIsNotNull() {
            addCriterion("user_organization is not null");
            return (Criteria) this;
        }

        /**
         * 用户组织相等
         * @param value
         * @return
         */
        public Criteria andUserOrganizationEqualTo(String value) {
            addCriterion("user_organization =", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 用户组织不相等
         * @param value
         * @return
         */
        public Criteria andUserOrganizationNotEqualTo(String value) {
            addCriterion("user_organization <>", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 大于
         * @param value
         * @return
         */
        public Criteria andUserOrganizationGreaterThan(String value) {
            addCriterion("user_organization >", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 大于等于
         * @param value
         * @return
         */
        public Criteria andUserOrganizationGreaterThanOrEqualTo(String value) {
            addCriterion("user_organization >=", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 小于
         * @param value
         * @return
         */
        public Criteria andUserOrganizationLessThan(String value) {
            addCriterion("user_organization <", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 小于等于
         * @param value
         * @return
         */
        public Criteria andUserOrganizationLessThanOrEqualTo(String value) {
            addCriterion("user_organization <=", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 相似
         * @param value
         * @return
         */
        public Criteria andUserOrganizationLike(String value) {
            addCriterion("user_organization like", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         *  不相似
         * @param value
         * @return
         */
        public Criteria andUserOrganizationNotLike(String value) {
            addCriterion("user_organization not like", value, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 在集合中
         * @param values
         * @return
         */
        public Criteria andUserOrganizationIn(List<String> values) {
            addCriterion("user_organization in", values, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 不在集合中
         * @param values
         * @return
         */
        public Criteria andUserOrganizationNotIn(List<String> values) {
            addCriterion("user_organization not in", values, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 介于两数之间
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andUserOrganizationBetween(String value1, String value2) {
            addCriterion("user_organization between", value1, value2, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 介于 两数之外
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andUserOrganizationNotBetween(String value1, String value2) {
            addCriterion("user_organization not between", value1, value2, "userOrganization");
            return (Criteria) this;
        }

        /**
         * 角色为空
         * @return
         */
        public Criteria andRoleIsNull() {
            addCriterion("role is null");
            return (Criteria) this;
        }

        /**
         * 角色不为空
         * @return
         */
        public Criteria andRoleIsNotNull() {
            addCriterion("role is not null");
            return (Criteria) this;
        }

        /**
         * 相等
         * @param value
         * @return
         */
        public Criteria andRoleEqualTo(String value) {
            addCriterion("role =", value, "role");
            return (Criteria) this;
        }

        /**
         * 不相等
         * @param value
         * @return
         */
        public Criteria andRoleNotEqualTo(String value) {
            addCriterion("role <>", value, "role");
            return (Criteria) this;
        }

        /**
         * 大于
         * @param value
         * @return
         */
        public Criteria andRoleGreaterThan(String value) {
            addCriterion("role >", value, "role");
            return (Criteria) this;
        }

        /**
         * 大于等于
         * @param value
         * @return
         */
        public Criteria andRoleGreaterThanOrEqualTo(String value) {
            addCriterion("role >=", value, "role");
            return (Criteria) this;
        }

        /**
         * 小于
         * @param value
         * @return
         */
        public Criteria andRoleLessThan(String value) {
            addCriterion("role <", value, "role");
            return (Criteria) this;
        }

        /**
         * 小于等于
         * @param value
         * @return
         */
        public Criteria andRoleLessThanOrEqualTo(String value) {
            addCriterion("role <=", value, "role");
            return (Criteria) this;
        }

        /**
         * 相似
         * @param value
         * @return
         */
        public Criteria andRoleLike(String value) {
            addCriterion("role like", value, "role");
            return (Criteria) this;
        }

        /**
         * 不相似
         * @param value
         * @return
         */
        public Criteria andRoleNotLike(String value) {
            addCriterion("role not like", value, "role");
            return (Criteria) this;
        }

        /**
         * 在集合中
         * @param values
         * @return
         */
        public Criteria andRoleIn(List<String> values) {
            addCriterion("role in", values, "role");
            return (Criteria) this;
        }

        /**
         * 不在集合中
         * @param values
         * @return
         */
        public Criteria andRoleNotIn(List<String> values) {
            addCriterion("role not in", values, "role");
            return (Criteria) this;
        }

        /**
         * 介于两数之间
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andRoleBetween(String value1, String value2) {
            addCriterion("role between", value1, value2, "role");
            return (Criteria) this;
        }

        /**
         * 介于两数之外
         * @param value1
         * @param value2
         * @return
         */
        public Criteria andRoleNotBetween(String value1, String value2) {
            addCriterion("role not between", value1, value2, "role");
            return (Criteria) this;
        }
    }

    /**
     * 标准
     */
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    /**
     * 标准
     */
    public static class Criterion {
        /**
         * 私有字段
         */
        private String condition;

        /**
         * value第一字段
         */
        private Object value;

        /**
         * 第二字段
         */
        private Object secondValue;

        /**
         * 是否无值
         */
        private boolean noValue;

        /**
         * 单一值
         */
        private boolean singleValue;

        /**
         * 范围值
         */
        private boolean betweenValue;

        /**
         * 集合值
         */
        private boolean listValue;

        private String typeHandler;

        /**
         * 获取标准
         * @return
         */
        public String getCondition() {
            return condition;
        }

        /**
         * 获取值
         * @return
         */
        public Object getValue() {
            return value;
        }

        /**
         * 获取第二值
         * @return
         */
        public Object getSecondValue() {
            return secondValue;
        }

        /**
         * 判断是否无值
         * @return
         */
        public boolean isNoValue() {
            return noValue;
        }

        /**
         * 判断是否单一值
         * @return
         */
        public boolean isSingleValue() {
            return singleValue;
        }

        /**
         * 是否是范围值
         * @return
         */
        public boolean isBetweenValue() {
            return betweenValue;
        }

        /**
         * 是否是集合值
         * @return
         */
        public boolean isListValue() {
            return listValue;
        }

        /**
         * 获取处理器
         * @return
         */
        public String getTypeHandler() {
            return typeHandler;
        }

        /**
         * 构造函数
         * @param condition
         */
        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        /**
         * 多参数构造函数
         * @param condition
         * @param value
         * @param typeHandler
         */
        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        /**
         * 两个参数的构造函数
         * @param condition
         * @param value
         */
        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        /**
         * 比较完全的构造函数
         * @param condition
         * @param value
         * @param secondValue
         * @param typeHandler
         */
        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        /**
         * 构造函数
         * @param condition
         * @param value
         * @param secondValue
         */
        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}